#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>

using namespace std;

class Person {
public:
	virtual void BuyTicket() { cout << "买票-全价" << endl; }
	virtual void func() {}

private:
	int _a = 0;
};

class Student : public Person {
public:
	virtual void BuyTicket() { cout << "买票-半价" << endl; }
	void test() { cout << "where am i?" << endl; }
private:
	int _b = 1;
};

void Func(Person p)
{
	p.BuyTicket();
}
int main()
{
	Person p;
	Student s;

	Person p1 = s;
	Person& p2 = s;
	Person* p3 = &s;
	Func(p);
	Func(s);
	return 0;
}

//int main()
//{
//	double d = 3.14;
//	const int& i = d;
//	
//	cout << d << "  " << i << endl;
//	return 0;
//}